package com.sync.syncmasterdata.product.service.convert;

import com.sync.syncmasterdata.product.entity.BPM.InventoryForItemSheetEntity;
import com.sync.syncmasterdata.product.entity.u8.InvEx;
import com.sync.syncmasterdata.product.service.ConvertInterface;
import org.springframework.stereotype.Service;

/**
 * oa产品对象 转 U8对象扩展字段（自由项）
 */
@Service
public class ProductBPMToInvEx implements ConvertInterface<InventoryForItemSheetEntity,InvEx> {

    @Override
    public InvEx convertTo(InventoryForItemSheetEntity oa) {
        InvEx invEx = new InvEx();

        /**
         * 常量
         */
        invEx.setCInvCode(oa.getInventory_code_txt());
        /**
         * 业务类型
         */
        invEx.setCidefine2(oa.getBusiness_type());
        /**
         * 产品线
         */
        invEx.setCidefine3(oa.getProduct_line());
        /**
         * 产品组
         */
        invEx.setCidefine4(oa.getProduct_group());
        /**
         * 项目明细(文本)
         */
        invEx.setCidefine5(oa.getItem_name_txt());
        /**
         * 检测项目号
         */
        invEx.setCidefine6(oa.getItem_code());

        return invEx;
    }
}
